package cn.cxy.sidebardemo

import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import cn.cxy.sidebar.SideBarSelectCallBack
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        sideBar.setOnSelectCallBack(object : SideBarSelectCallBack {
            override fun onSelect(index: Int, selectStr: String?) {
                Toast.makeText(this@MainActivity, selectStr, Toast.LENGTH_LONG).show()
            }
        })
    }
}